<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.common.effects.js" ></script>
    <script src="../libraries/RGraph.line.js" ></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A spline Line chart with multiple lines given as an array</title>
    
    <meta name="robots" content="noindex,nofollow" />
    <meta name="description" content="A curvy Line chart (a spline) that has multiple lines. It uses the Line chart Trace effect. In this chart the arguments are given as one big multidimensional array" />
     
</head>
<body>

    <h1>A spline Line chart with multiple lines given as an array</h1>
    
    <p>
        In this example the two datasets are given to the constructor as one big multidimensional array. This method can be useful
        when you're using AJAX.
    </p>

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
    
    <script>
        $(document).ready(function ()
        {
            var dataset1 = [4,5,1,6,3,5,2];
            var dataset2 = [7,7,8,6,2,1,1];

            var line = new RGraph.Line({
                id: 'cvs',
                data: [dataset1, dataset2],
                options: {
                    spline: {
                        self: true,
                        tickmarks: {
                            fill: null,
                            size: 5,
                            stroke: {
                                self: '#aaa',
                                linewidth: 2
                            }
                        }
                    },
                    linewidth: 3,
                    hmargin: 5,
                    labels: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
                    tooltips: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'],
                    tickmarks: 'circle'
                }
            }).trace()
        })
    </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>